package com.mccrea.pattern.state;

/**
 * @Classname ScoreContext
 * @Description 环境类
 * @Date 2021/5/24 0024 15:00
 * @Created by Mccrea_Gao
 */
public class ScoreContext {
    private AbstractState state;

    public ScoreContext() {
        state = new LowState(this);
    }

    public AbstractState getState() {
        return state;
    }

    public void setState(AbstractState state) {
        this.state = state;
    }

    public void add(int score) {
        state.addScore(score);
    }
}
